package BehaviorModel.interpreterModel;

import java.util.HashMap;

/**
 * 功能描述: 减法表达式
 * 2024/05/13
 *
 * @see SymbolExpression
 * ZhangYi
 */
public class SubExpression extends SymbolExpression{
    public SubExpression(AExpression left,
                         AExpression right) {
        super(left,
              right);
    }

    @Override
    public int interpret(HashMap<String, Integer> val) {
        return super.left.interpret(val)-super.right.interpret(val);
    }
}
